@extends('layouts.tankuang')

@section('content')
    <form name="add_form" id="add_form" action="{{url('admin/units/add_baowei',$id)}}" method="post" enctype="multipart/form-data">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div>
            <h2 class="text-center mg_b36 mg_t25">警情上报</h2>
            <table class="table-form table-border w1000 mg-auto">
                <tr>
                    <td width="10%" align="center" class="font-bd">类型</td>
                    <td width="16%">
                        <select class="w150 input_all" name="type">
                            <option value="">请选择</option>
                            <option value="盗窃" @if($re->type == '盗窃')selected @endif>盗窃</option>
                            <option value="抢劫" @if($re->type == '抢劫')selected @endif>抢劫</option>
                            <option value="杀人" @if($re->type == '杀人')selected @endif>杀人</option>
                            <option value="伤害" @if($re->type == '伤害')selected @endif>伤害</option>
                        </select>
                    </td>
                    <td width="10%" align="center" class="font-bd">嫌犯人数</td>
                    <td width="16%"><input type="text" class="form-input" value="{{$re->xianfanrenshu}}" name="xianfanrenshu"></td>
                    <td align="center" width="12%" class="font-bd">是否上报</td>
                    <td width="16%">
                        <select class="w150 input_all" name="shangbaoxinxi">
                            <option value="">请选择</option>
                            <option value="已上报" @if($re->shangbaoxinxi == '已上报')selected @endif>已上报</option>
                            <option value="未上报" @if($re->shangbaoxinxi == '未上报')selected @endif>未上报</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td width="10%" align="center" class="font-bd">损失</td>
                    <td width="16%">
                        <input type="text" class="form-input" value="{{$re->shunshi}}" name="shunshi">
                    </td>
                    <td width="10%" align="center" class="font-bd">人员伤亡</td>
                    <td width="16%"><input type="text" class="form-input" value="{{$re->renyuanshangwang}}" name="renyuanshangwang"></td>
                    <td align="center" width="12%" class="font-bd">其他灾害事故数</td>
                    <td width="16%">
                        <input type="text" class="form-input" value="{{$re->qitashigu}}" name="qitashigu">
                    </td>
                </tr>
                <tr>
                    <td align="center" class="font-bd">具体情况</td>
                    <td colspan="5">
                        <textarea class="textarea" name="jutiqingkuang">{{$re->jutiqingkuang}}</textarea>
                    </td>
                </tr>
                <tr>
                    <td align="center" class="font-bd">处置情况</td>
                    <td colspan="5">
                        <textarea class="textarea" name="chuzhiqingkuang">{{$re->chuzhiqingkuang}}</textarea>
                    </td>
                </tr>
            </table>
            {{--<div class="w1000 wbt mg_t25 mg_b18">
                <span class="font-bd">填报单位：</span>
                <input type="text" class="w250 input_bottom dsp" name="">
                <span class="itv"></span>
                <span class="font-bd">填报人：</span>
                <input type="text" class="w250 input_bottom dsp">
            </div>--}}
            <div class="w1000 wbt mg_t25">
                <button id="go" type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-save'">确定</button>
            </div>
        </div>
    </form>

    <script>
        $('#go').click(function (){
            $.ajax({
                cache: true,
                type: "POST",
                url: "{{url('admin/units/edit_zdqk',$id)}}",
                data:$('#add_form').serialize(),
                async: false,
                error: function(data) {
                    $.messager.alert('信息提示',data.msg,'info');
                },
                success: function(data) {
                    $.messager.alert('信息提示',data.msg,'info');
                    $('#tk').dialog('close');
                    $('.pagination-load').click();
                }
            });
        });
    </script>
@stop